package com.aracky.assess.mapper;

import com.aracky.assess.model.entity.HrKpiPostPerformanceConfig;
import com.aracky.assess.model.request.HrKpiPostPerformanceConfigRequest;
import com.aracky.assess.model.request.PostDeptRequest;
import com.aracky.assess.model.vo.HrKpiPostPerformanceConfigVO;
import com.aracky.assess.model.vo.PerformanceAssessorTableVO;
import com.aracky.assess.model.vo.PostDeptVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 岗位考核指标配置 Mapper 接口
 * </p>
 *
 * @author zzp
 * @since 2022-08-01 09:43:18
 */
@Mapper
public interface HrKpiPostPerformanceConfigMapper extends BaseMapper<HrKpiPostPerformanceConfig> {
    /**
     * 查询列表
     * @param topage
     * @param hrKpiPostPerformanceConfigRequest
     * @return
     */
    IPage<HrKpiPostPerformanceConfigVO> findHrKpiPostPermanceConfig(Page topage, @Param("hkppcr") HrKpiPostPerformanceConfigRequest hrKpiPostPerformanceConfigRequest);


    /**
     * 根据岗位id查询指定岗位的考核指标详情
     * @param toPage
     * @param hrKpiPostPerformanceConfigRequest
     * @return
     */
    IPage<HrKpiPostPerformanceConfigVO> selectPageList(Page toPage ,@Param("hkppcr") HrKpiPostPerformanceConfigRequest hrKpiPostPerformanceConfigRequest);

    /**
     * 分也查询岗位部门列表信息
     * @param toPage
     * @param postDeptRequest
     * @return
     */
    IPage<PostDeptVO> selectPostDept(Page toPage,@Param("pdr") PostDeptRequest postDeptRequest);

    /**
     * 查询岗位部门考核评分人以及指标表详情的表头信息
     * @param postId
     * @return
     */
    List<PerformanceAssessorTableVO> selectDetailTableHeader(@Param("postId") Long postId);

    /**
     * 根据postId查询岗位指标列表信息
     * @param postId
     * @return
     */
    List<HrKpiPostPerformanceConfigVO> selectByPostId(Long postId);

    /**
     * 根据id去修改员工的填报日期和评价日期
     * @param hrKpiPostPerformanceConfig
     * @return
     */
    Integer updatePostPerformanceConfig(@Param("hkppc") HrKpiPostPerformanceConfig hrKpiPostPerformanceConfig);
}
